home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Source / MiscGISKit / MiscUTMCoord.m < prev    next >
Text File  |  1995-07-20  |  2KB  |  76 lines

  1. /*============================= MiscUTMCoord.m ==============================*/
  2. /* MiscUTMCoord class contains and supports values representing locations
  3.    in a Universal Transverse Mercator coordinate system.
  4.  
  5.    DMA Release 0.8, Copyright @1993 by Genesis Project, Ltd. All Rights
  6.    Reserved. For further information on terms and conditions see:
  7.         Documentation/GISKit/Agreements-Legal-README
  8.  
  9. HISTORY
  10. 25-Feb-93  Dale Amon at GPL
  11.        Created.
  12. */
  13.  
  14. #import <misckit/miscgiskit.h>
  15.  
  16. @implementation MiscUTMCoord
  17.  
  18. /*===========================================================================*/
  19. /* Initialization methods */
  20. /*===========================================================================*/
  21. /* DESIGNATED INITIALIZER */
  22.  
  23. -initDescription: (char *) txt constants: anObject
  24.  {return 
  25.     [super initDescription: txt
  26.              converter: [MiscPlanetCoordConverter new]
  27.              constants: anObject];
  28.  }
  29.  
  30. /*---------------------------------------------------------------------------*/
  31. /* Block the designated initializer of our parent class */
  32.  
  33. -initDescription: (char *) txt
  34.        converter: (id <MiscCoordConverterServer>) aConverter
  35.        constants: anObject
  36.  {    [self error:"  %s class should not be sent '%s' messages\n",
  37.             [[self class] name], sel_getName(_cmd)];
  38.     return self;
  39.  }
  40.  
  41.  
  42. /*===========================================================================*/
  43. /* Coordinate handling methods */
  44. /*===========================================================================*/
  45. /* set UTM grid coord value */
  46.  
  47. -setCoordEastingMeters: (double) east
  48.         northingMeters: (double) north
  49.        elevationMeters: (double) alt
  50.  {    [self setCoord: east : north : alt];
  51.     return self;
  52.  }
  53.  
  54.  
  55. /*---------------------------------------------------------------------------*/
  56. /* Get UTM grid coord value */
  57.  
  58. -coordEastingMeters: (double *) east
  59.      northingMeters: (double *) north
  60.     elevationMeters: (double *) alt
  61.  {    [self coord: east : north : alt];
  62.     return self;
  63.  }
  64.  
  65.  
  66. /*---------------------------------------------------------------------------*/
  67. /* UTM coordinates are easting, northing and elevation above the local
  68.    mean radius.
  69. */
  70.  
  71. -(double) easting   {return [self coord1];}
  72. -(double) northing  {return [self coord2];}
  73. -(double) elevation {return [self coord3];}
  74.  
  75. @end
  76.